using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace LPV_POS
{
    public partial class bc_danhsachhanghoatralai : DevExpress.XtraEditors.XtraForm
    {
        thuvien tv;
        DataTable tb;
        string[] s;
        object[] o;
        public bc_danhsachhanghoatralai()
        {
            InitializeComponent();
        }

        private void bc_danhsachhanghoatralai_Load(object sender, EventArgs e)
        {
            xl_filetext filetext = new xl_filetext();
            filetext.f_readfiletext(Application.StartupPath + "\\baocao\\bc_dshanghoatralai.txt");
        }

        private void bton_taofile_Click(object sender, EventArgs e)
        {
            xl_filetext filetext = new xl_filetext();
           //byte ketqua = 0;
           string[] key = new string[3] { "[LANGUAGE]", "[USER]", "[PASS]" };
           string[] display = new string[3]{"VIET NAM","To Hoai Chuong","123456"};
           filetext.f_writedataintext("baocao2.txt", Application.StartupPath + "\\baocao", key, display);
          

        }

        private void bton_chuoingay_Click(object sender, EventArgs e)
        {

            tv = new thuvien();
            s = new string[] { "@flag", "@choose" };
            o = new object[] { 1, 1 };
            tb = tv.SP_SelectDataTable("SP_GETDATE", s, o);
            string chuoingay = tb.Rows[0]["CHUOINGAY"].ToString();
            xulyngaythangnam ngaythang = new xulyngaythangnam();
            LPV_POS.Module.MessageBox_LPV.Show(ngaythang.chuoingay(chuoingay));


        }
    }
}